package com.example.thread.base.demo1;

import lombok.extern.slf4j.Slf4j;

/**
 * @author LiYuhang
 * @version 0.1
 * @application 通过runnable 实现
 * @Date 2020/8/5 17:29
 */
@Slf4j(topic = "c_demo1_2")
public class demo1_2 {
    public static void main(String[] args) throws InterruptedException {
        MyRunnable myRunnable = new MyRunnable();
        Thread thread = new Thread(myRunnable);
        thread.start();
        log.info("demo1_2 run");
    }
}

@Slf4j(topic = "c_MyRunnable")
class MyRunnable implements Runnable {

    @Override
    public void run() {
        log.info("MyRunnable run");
    }
}
